public class Base3Computer_type3 {

	public static void main(String[] args) {
	 int x = 10;
	 String total;	

	 
	total = computeBase3(x);
	
	
		System.out.println();
		System.out.println(total);
	

	}
	
	
	public static String computeBase3(int input)
	{
		
		
		if (input!=0) // recursive case
		{
			computeBase3(input/3);
			
			return computeBase3(input/3) + (input%3);
			
		}		
		
		else 
		{
			return "";
		}
	}
}